//打开窗口

const {ipcMain, BrowserWindow} = require("electron")

let win = null;
ipcMain.handle('on-open-event', (event, args) => {
    if (!win) {
        win = new BrowserWindow({
            width: 1200,
            height: 800,
        })
        win.setMenu(null)
    }
    win.loadURL(args);
    win.webContents.on("context-menu",(event,point)=>{

    })
    win.on("closed", () => {
        win = null;
    })
})
